package com.lmk;

import java.util.Scanner;

public class Test03 {
    public static void main(String[] args) {
        int num=0;
        int n=0;
        String name=null;
        double price=0;
        Scanner sc=new Scanner(System.in);
        System.out.println("******************************************************");
        System.out.println("请选择购买的商品编号");
        System.out.println("1.T恤         2.网球鞋    3.网球拍 ");
        System.out.println("***************************");
        System.out.print("请输入商品编号");
        num= sc.nextInt();
        System.out.println("请输入购买数量");
        n=sc.nextInt();
        switch (num){
            case 1:
                name="T恤";
                price=245.0;
                break;
            case 2:
                name="网球鞋";
                price=570.0;
                break;
            case 3:
                name="网球拍";
                price=320.0;
                break;
           }int p=(int) (0.8*price*n);


boolean pass=false;
       boolean repeat=true;
      while (!repeat){


      } System.out.println("是否继续(y/n)?");
        String src=sc.next();
        if ("y".equals(src)){
            pass=true;
        }
        System.out.println("折扣：0.8");

        System.out.println("应付价格"+p);
        System.out.println("实付金额");
        num=sc.nextInt();
        System.out.print("找钱"+(num-p));
    }
}
